package day240816.file;

import java.io.File;

public class DeleteDirDemo {
    public static void main(String[] args) {
        //File dir = new File("./test");
        File dir = new File("./a");
        if(dir.exists()){
            dir.delete();//目录为空才能删除
            System.out.println("文件已删除");

        }else{
            System.out.println("文件不存在");
        }
    }
}
